import ajax from './fetch'

const PRE_URL = '/api/blogs'

const serachList = (params) => {
  return ajax.get(`${PRE_URL}/search`, { params: { ...params } })
}
const addList = () => {
  return ajax.post(`${PRE_URL}`)
}
const updateList = (id) => {
  return ajax.put(`${PRE_URL}/${id}`)
}


export default {
  serachList, addList, updateList
}
